sql defensive design logic gates truth tables introduction boolean string expression function if python basics